<?php
require_once '../requires.php';
session_start();

$type = $_GET['type'];
$api = ApiFac::getApi($type);

$api->setOauth($_SESSION['request_token']['oauth_token'], $_SESSION['request_token']['oauth_token_secret']);
$oauth_verifier = $_GET['oauth_verifier'];
$access_token = $api->getAccessToken($oauth_verifier);
$_SESSION['access_token'] = $access_token;

echo "<a href=\"api.php?type={$type}\">test data</a>";
?>